import { LIST_NAV, TUIJIAN_LIST, LOOP_LIST } from '../content'
import axios from 'axios'

export function fetchMainData() {
    return dispatch => {
        axios.post("https://srv.hotkidceo.com/appapi/api/root-ceo-content/hpPageConfigure/pageList", { "channelId": null, "memberKey": "" })
            .then(res => {
                dispatch({
                    type: LIST_NAV, data: res.data.data[2].configureAttribute,
                });
                dispatch({
                    type: TUIJIAN_LIST, data: res.data.data[10].configureAttributeList,
                });
                dispatch({
                    type: LOOP_LIST, data: res.data.data[1].configureAttribute
                });
            })
    }
}